<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ page import="board1.UserDAO"%>
<%@ page import="board1.UserTO"%>

<%
	request.setCharacterEncoding("UTF-8");

	UserTO to = new UserTO();
	to.setPhone_number(request.getParameter("phone_number"));

	// 	to.setChon_id(request.getParameter("chon_id"));
	// 	to.setUser_name(request.getParameter("user_name"));
	// 	to.setUser_lv(request.getParameter("user_lv"));

	// 	out.println(request.getParameter("phone_number"));
	// 	out.println(request.getParameter("chon_id"));
	// 	out.println(request.getParameter("user_name"));
	// 	out.println(request.getParameter("user_lv"));

	// 	to.setContent(request.getParameter("content"));
	// 	to.setWip(request.getRemoteAddr());

	UserDAO dao = new UserDAO();

	to = dao.viewUser(to);

	String return_msg = "";

	// 	if(to.getUser_name().equals())
	// 		return_msg = "[{\"phone_number\": Nothing}]";
	// 	else
	return_msg = "[{\"phone_number\": \"" + to.getPhone_number() 
		+ "\",\"user_name\" : \"" + to.getUser_name() 
		+ "\",\"chon_id\":\"" + to.getChon_id() 
		+ "\",\"user_lv\":\"" + to.getUser_lv() + "\"}]";

	out.println(return_msg);
%>